package com.lekang.service.impl;

import java.util.List;
import com.lekang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lekang.mapper.AssessmentReportMapper;
import com.lekang.domain.AssessmentReport;
import com.lekang.service.IAssessmentReportService;

/**
 * 评估报告Service业务层处理
 * 
 * @author wjy
 * @date 2025-10-15
 */
@Service
public class AssessmentReportServiceImpl implements IAssessmentReportService 
{
    @Autowired
    private AssessmentReportMapper assessmentReportMapper;

    /**
     * 查询评估报告
     * 
     * @param id 评估报告主键
     * @return 评估报告
     */
    @Override
    public AssessmentReport selectAssessmentReportById(Long id)
    {
        return assessmentReportMapper.selectAssessmentReportById(id);
    }

    /**
     * 查询评估报告列表
     * 
     * @param assessmentReport 评估报告
     * @return 评估报告
     */
    @Override
    public List<AssessmentReport> selectAssessmentReportList(AssessmentReport assessmentReport)
    {
        return assessmentReportMapper.selectAssessmentReportList(assessmentReport);
    }

    /**
     * 新增评估报告
     * 
     * @param assessmentReport 评估报告
     * @return 结果
     */
    @Override
    public int insertAssessmentReport(AssessmentReport assessmentReport)
    {
        assessmentReport.setCreateTime(DateUtils.getNowDate());
        return assessmentReportMapper.insertAssessmentReport(assessmentReport);
    }

    /**
     * 修改评估报告
     * 
     * @param assessmentReport 评估报告
     * @return 结果
     */
    @Override
    public int updateAssessmentReport(AssessmentReport assessmentReport)
    {
        assessmentReport.setUpdateTime(DateUtils.getNowDate());
        return assessmentReportMapper.updateAssessmentReport(assessmentReport);
    }

    /**
     * 批量删除评估报告
     * 
     * @param ids 需要删除的评估报告主键
     * @return 结果
     */
    @Override
    public int deleteAssessmentReportByIds(Long[] ids)
    {
        return assessmentReportMapper.deleteAssessmentReportByIds(ids);
    }

    /**
     * 删除评估报告信息
     * 
     * @param id 评估报告主键
     * @return 结果
     */
    @Override
    public int deleteAssessmentReportById(Long id)
    {
        return assessmentReportMapper.deleteAssessmentReportById(id);
    }
}
